UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'F1xBon9/Ft2ArqpoJ6sNXf0PvZQSLH8Ih5hltjaXhE0='
WHERE
key_id = '3b07f890771b85ce3cb93de1677d81ca1a9ee915c9178dd188a2f95bb4775428'
AND (
token = 'F1xBon9/Ft2ArqpoJ6sNXf0PvZQSLH8Ih5hltjaXhE0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)