First of all, when starting a new exercise, you should never start with 3 sets of 12. Your body has to get used to an exercise at a low rep count first until you build strength to do more. Begin with a set of 10, progress to 2 sets of 10, then 3. (This is how we progress all exercises in our videos). This is the safest way to exercise. It sounds like your glute medius muscle isn't strong enough to stabilize your hip yet for this exercise. It fatigues very quickly then goes into spasm. Stretching will help alleviate it, but not prevent it. To strengthen this muscle, you can do a clamshell exercise with an exercise band, side leg lifts w/ a small weight, band walks, or lateral step downs. As your glute medius gets stronger, you will be able to do the lunges. Also remember when doing lunges, the knee never should go past the toe. Let me know if you have other questions!