New parametrization of $A^2+B^2+C^2=3D^2$ and Lagrange's four-square theorem