How to animate Constraints?
There must be a better way to do what you want, but to answer your particular question about animating child of constraint, you can use the influence slider of each constraint.

Constraint the mag with two "child of" constraints, one linked to the gun, and another linked to the hand. Then you can animate their influences so that when the first is at 1, the other is at 0, and vice-versa.