UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eJRTGfFozY8MKYol4oYcWs5p25vnMDmQEGTklBzvmFQ='
WHERE
key_id = 'd953ff693b564b89b50c0497d6a1d98445dea76aea72074db0a130ac72ff50c1'
AND (
token = 'eJRTGfFozY8MKYol4oYcWs5p25vnMDmQEGTklBzvmFQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)