According to Wikipedia, the mass $M$ is one of the Casimir invariants of the Galilean group. Casimir invariants of a group are made out of the generators, and they commute with all the generators of the group. For example, the Casimir invariant of the group $SU(2)$ is $J^2$ which is made out of $J_1, J_2, J_3$ as $$J^2:=J_1^2+J_2^2+J_3^2.\tag{1}$$ Another example is a Casimir invariant of the Poincare group $P^\mu P_\mu$ which is made out of $P_0, P_1,P_2, P_2$ as $$P^\mu P_\mu:=-P_0^2+P_1^2+P_2^2+P_3^2.\tag{2}$$
In the same manner, can we write $M$ as a function of the generators Galilean group?