UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'oIaUJM4k/InoWZNk4nHZ5htC0+3hpM0BqukAIFwO3hY=' 
WHERE 
  key_id = '80c5686927af506f7890038ce5317ca5fa7ac18f8638d38a98d20e4dc2f0c083' 
  AND (
    token = 'oIaUJM4k/InoWZNk4nHZ5htC0+3hpM0BqukAIFwO3hY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033