UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MjW13Z3dDnm6RhTjTJj8q47S/BBnsRxIjW5JzQZSGuc='
WHERE
key_id = 'ce2c60b235faba9c6ca329efba21725181c1a70c97550c8bc8e62be2bc2f61b4'
AND (
token = 'MjW13Z3dDnm6RhTjTJj8q47S/BBnsRxIjW5JzQZSGuc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)