UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'XvhCFjt96NAwhf5JUYfprPuiP1djx4E0A/lXVBqoNKs='
WHERE
key_id = '2154634707f6864d4a6903cd70eb4bc195a5c4877f67fa705ad28367bd91eda9'
AND (
token = 'XvhCFjt96NAwhf5JUYfprPuiP1djx4E0A/lXVBqoNKs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)