Quantum tunneling of electron snake states in an inhomogeneous magnetic field