You basically just need to be careful about the distinction between velocity and speed. In particular, you say that
Won't the particles change velocity when exposed to the magnetic field, and therefore change KE?
A change in velocity is not necessarily accompanied by a change in speed, and it's the speed that determines the kinetic energy. The magnetic field can change the directions of the motions of the charged particles, but it will not change their speeds.
The mathematical details of this are as follows. The force on a charged particle of charge $q$ moving in a magnetic field $\mathbf B$ is
$$
\mathbf F = q\mathbf v\times\mathbf B
$$
where $\mathbf v$ is the velocity of the particle. Now, note that Newton's second law says that the force on the particle equals the rate of change of its momentum; $\mathbf F = \dot{\mathbf p}$. So we get
$$
\dot{\mathbf p} = q\mathbf v\times\mathbf B
$$
Now take the dot product of both sides with $\mathbf p$. Note that the (non-relativistic) momentum of the particle is $\mathbf p = m\mathbf v$, so when we take the dot product of the right hand side with $\mathbf p$, we get zero. Putting this all together gives $\mathbf p \cdot\dot{\mathbf p} = 0$ which implies that
$$
\frac{d}{dt}\frac{\mathbf p^2}{2m} = 0
$$
In other words, the kinetic energy is constant in time.
Addendum June 24, 2013.
The details of the argument above assumed the non-relativistic expression for the momentum of a mass particle. However, the argument still carries through in a relativistic context. To see this, note that the relativistic expression for the momentum of a particle is
$$
\mathbf p = \gamma m\mathbf v, \qquad \gamma = (1-\mathbf v^2/c^2)^{-1/2}
$$
and using this definition, Newton's second law can in this context still be written as $\mathbf F = \dot{ \mathbf p}$, so the equation of motion for a massive particle moving in a magnetic field is still $\dot {\mathbf p} = q\mathbf v\times \mathbf B$. Moreover, since the velocity and momentum are still proportional to one another, dotting both sides of this equation of motion still gives $\mathbf p\cdot\dot{\mathbf p} = 0$ and therefore that
$$
\frac{d}{dt}\mathbf p^2 = 0
$$
Now recall that the kinetic energy of a relativistic particle is given by its total energy $E=\gamma mc^2$ minus its rest energy $mc^2$;
$$
K = E - mc^2
$$
In particular, the time derivative of its total energy equals the time derivative of its rest energy; $\dot K = \dot E$. On the other hand, recall the relation
$$
m^2c^4 = E^2 - c^2\mathbf p^2
$$
Combining this relation, and the fact that the time derivatives of the kinetic and total energies are equal, we find that the desired result
$$
\dot K = 0
$$
holds in a relativistic context as well.
Best Answer
The invariant mass is equal to the total energy in the center-of-momentum reference frame. This does not mean that the center-of-momentum frame must coincide with the lab frame. Instead it means that it is possible in principle for the collision to produce a particle with mass $M$ which is at rest in the center-of-momentum frame. Particles less massive than $M$ can only be produced if there is some other particle to carry away the excess energy, and particles heavier than $M$ can only be produced virtually.