How to handle expiration of otp

date are getting stored in utc format how can i compare them

like he /send-otp
update the db with date

now /verify-otp
compare the current date time and with db date time find if it is greater than 5 minutes throw an message like your otp is expired

I am not getting how can i do this with code.

Thank you