UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Lu0rLZTCSLzEtPGMC90xVYeYyfukEDi9WBd/3mSv7u0='
WHERE
key_id = '69d6a6f6473366d55fcee4552758c5740346d4199273cf7ad7eb099eda2946db'
AND (
token = 'Lu0rLZTCSLzEtPGMC90xVYeYyfukEDi9WBd/3mSv7u0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)