Any consistent system will do. That's the entire point of systems of units--if you stick to one, you don't need to worry about the units too much. And it never happens that a certain equation only works in a certain system*.
In this case, you would use joules ($\:\mathrm{J}\equiv\:\mathrm{kg\:m^2\:s^{-2}}$), the metric unit of energy. If you were using the cgs system, $m$ would be in grams, $p$ would be in $\:\mathrm{g\:cm\:s^{-1}}$, $c$ would be in centimetres per second, and $E$ would be in ergs ($\:\mathrm{erg}\cong\:\mathrm{g\:cm^2\:s^{-2}}$),
Physical constants may change. Also, some equations have some constants set to one (eg Planck units, Gaussian units), so they may disappear entirely. For example, if $c=1$ (Planck units), the equation becomes $E^2=m^2+p^2$.