UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'r/IAbEXhdK+OB+kgOPyCGZfJ5EHHQWskrCHnPpwkeYA='
WHERE
key_id = '94918e3e674a85e4c46e2ecc1d95b56fbc066cf4e2477300b459ddc4b0186aed'
AND (
token = 'r/IAbEXhdK+OB+kgOPyCGZfJ5EHHQWskrCHnPpwkeYA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)