Evolution of cosmic ray electron spectra in magnetohydrodynamical simulations