UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FhRRxntVT8mZOMdaVzQCwBkX2UmLWPkFn+d6ZEmLcqY='
WHERE
key_id = 'bbce28c81b64cea9c67265d2d0ec6bb555f50dadfd889acac4cae59906d2e762'
AND (
token = 'FhRRxntVT8mZOMdaVzQCwBkX2UmLWPkFn+d6ZEmLcqY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)