UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sy/wf/EmTRWbZJk7wlFvSdtq90KiUQO5jI3NpSrB+UE='
WHERE
key_id = '57e3e2507bd58272efd0eebd7d163632b09253ee5bd721640a1b1fb797e48d27'
AND (
token = 'sy/wf/EmTRWbZJk7wlFvSdtq90KiUQO5jI3NpSrB+UE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)