UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3Fw5jIdSyVoxx9hQpc3pkPWv9eVk5MwXJwB+FeWLUQE=' 
WHERE 
  key_id = 'd33d55c77dc69d2773966beb4e4a66ae1b68ebc94cca5fbebf9360bc66b6deee' 
  AND (
    token = '3Fw5jIdSyVoxx9hQpc3pkPWv9eVk5MwXJwB+FeWLUQE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028