The goal of the sensor network localization problem is to determine positions of all the sensor nodes in a network given certain pairwise noisy distance measurements and inaccurate anchor node positions. A two-step distributed localization approach based on second-order cone programming (SOCP) relaxation is presented. In the first step, the sensor nodes determine their positions based on local information and in the second step, the anchor nodes refine their positions using information from the neighboring nodes. Our numerical study shows that the sensor and anchor positions cannot be estimated in a single step; the sensors must be estimated first for the results to converge. The second step enables anchors which are in the convex hull of their neighbors to refine their positions. Extensive simulation results with inaccurate anchor positions and noisy distance measurements are presented. These illustrate the robustness of the algorithm and the performance gains achievable in terms of problem size reduction, computational efficiency and localization accuracy.