CustomSMS activity - OTP Limit time

I am currently using the customSMS activity to send OTP (One-Time Password) for user registration and password reset.

The functionality is working correctly, but I would like to implement a time limit of 5 minutes for the OTP to expire.

Someone have ideas  how can I do it?