- update tb_coupon_user set status = 2 where date_format(expiration_time,'%Y-%m-%d %H:%i:%S') < date_format(now(),'%Y-%m-%d %H:%i:%S')
+ update tb_coupon_user set status = 2 where status = 0 and date_format(expiration_time,'%Y-%m-%d %H:%i:%S') < date_format(now(),'%Y-%m-%d %H:%i:%S')