select * ,now(), DATE_ADD(create_time, INTERVAL 5 MINUTE) from ecs_sms_cache
where now() between create_time and DATE_ADD(create_time, INTERVAL 5 MINUTE)
order by create_time desc limit 1
转载于:https://www.cnblogs.com/bokucoukei/p/4730020.html