UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UZCb/ysXKA/fcEvUDDCssFX23aaNHyG/Sujnl6hegzo='
WHERE
key_id = '6ce53f0b2c80e5e51fac35ec1f780f88101b5aed1ff32554f4a81939c7523b56'
AND (
token = 'UZCb/ysXKA/fcEvUDDCssFX23aaNHyG/Sujnl6hegzo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)