In my login script I have a password reset function that creates a record that includes a unique token and an expiry date (datetime field) of 48 hours from the time the password reset was requested.
How do I create an SQL statement that will check the token is still valid by only getting the record if the expiry date has not expired e.g.
SELECT * FROM resetpasstable WHERE expires > now()
I'm kind of new to all this so any help appreciated.