An efficient and robust method to estimate halo concentration based on the method of moments