UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/UzU5NhR1qyfst4OyfU+U37gd18UwFSqcH6mWURYOM4='
WHERE
key_id = '0aa8248cbdaa0a5e862039f53ad1e926c87e731f497832a0bfe4f7bcb4f1cdf0'
AND (
token = '/UzU5NhR1qyfst4OyfU+U37gd18UwFSqcH6mWURYOM4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)