UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'XMwox0QEvxsftGKB5X8NFdepr7JaWuodtOHZfltk4vM='
WHERE
key_id = 'fc2880b53e30f58a3abb72aac2e90b4fac3aad9c93fdc3f1cb9b798dee6d011f'
AND (
token = 'XMwox0QEvxsftGKB5X8NFdepr7JaWuodtOHZfltk4vM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)