UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'DxKnkHDJucEYBDNRRbIpm513/LpWhZzK81BHWtvoNpg=' 
WHERE 
  key_id = '4eabc15647b26c94f2a1e741897a996f355bf0270907d9d453ee05746cf2335f' 
  AND (
    token = 'DxKnkHDJucEYBDNRRbIpm513/LpWhZzK81BHWtvoNpg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030