UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/I3EZLGjS5MbQnAm7x5A+nhmuvOfx35FPZG3FBHZNk0='
WHERE
key_id = '0fb35bf0136a360dd2eac31041f6ccca19884209bbb695c201e28e107e5050b3'
AND (
token = '/I3EZLGjS5MbQnAm7x5A+nhmuvOfx35FPZG3FBHZNk0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)