it has nothing to do with CM frame ([itex]p^2= m^2[/itex] in any frame -frame independent minkowski product).
Probably they consider electron/muon with high enough momenta/Energy so that they can be considered massless (i.e. the last [itex]=[/itex] in 2nd line should be [itex]\approx[/itex] instead)