UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'CFJ7ufuUnp6k4Yinyeh14SN3sGGNSi3Ap0mecBKKLpY='
WHERE
key_id = '5466ca7174305256d1817b7c558522f09f8c87602d4f474577a65792b745493e'
AND (
token = 'CFJ7ufuUnp6k4Yinyeh14SN3sGGNSi3Ap0mecBKKLpY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)