UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'XSj5CzuKhz/IxVyti1lJtkU9DGxa5/Ls9hu9oKcdDcQ='
WHERE
key_id = 'e2b337f6ffbbfceb90e632fc4914e9ba3d3a2da8de7708a9e563efc35358b19a'
AND (
token = 'XSj5CzuKhz/IxVyti1lJtkU9DGxa5/Ls9hu9oKcdDcQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)