UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2WixjocXjlW0FgZqOhuUJHcC/EXJnw/BLFNnuIp3RFc=' 
WHERE 
  key_id = 'eff68db9b77a57c7b2829bbe3aefaf91599978b3e648c8d672eb55194b9fdb82' 
  AND (
    token = '2WixjocXjlW0FgZqOhuUJHcC/EXJnw/BLFNnuIp3RFc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029