如何使用PHP在一小时内限制忘记密码链接

i need one help.I am sending one forgot password link to user's email to reset the password.I need to restrict that link suppose after some hour(lets say 2 hr).that exact link will not work.I am explaining my code below.

$message='<p>You recently requested to reset your password.You can reset password by following the link below.If you no longer need to rest your password ,you can ignore this message.</p></br><p><a href="http://thespesh.com/portal/#/resetPass?m_i='.$encrypt_id.'">Reset my password</a></p>';

The above message is sent to user as message body.Here one link is present.I need after 2 hour that exact link will invalid and not work.Please help me.

In database store the timestamp when it was created. Then while you are validating the token , get current time and the time when it was created from database. If diffrence is greater that 1 hour then it has expired. Else it is still valid token