UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EqKjdy4hTgoqkhrF6UnzyYFiLYlHMcD7pbYOxFf6o9g='
WHERE
key_id = '9b5b9de3f7f10b4c809c39505d4fc7658ae17c6ab310083562b491d6409cdf49'
AND (
token = 'EqKjdy4hTgoqkhrF6UnzyYFiLYlHMcD7pbYOxFf6o9g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)