UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cmu/1wyXdFozgEsNoSu7R9/OSxQe8ymIohImxtqicpM='
WHERE
key_id = 'dfaaab9555ae2ccff553766c4b8c5641c648ff29dae33fcca9c06a102fb8b153'
AND (
token = 'cmu/1wyXdFozgEsNoSu7R9/OSxQe8ymIohImxtqicpM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)