just condition your legs better, you should rarely if ever have straight/locked out knees.

If it was happening because you he was bending to much... trust me you'd know about it, you wouldn't be asking as about it and your trainer definetly would of spotted it.

Perfectly normal, nothing to worry about... just keep sparring, doing bag work, training your legs and getting your road work in...

It's the first time you've sparred and your body isn't used to it, REALLY fit lads in our gym who only do the conditioning for years and then try out sparring struggle physically the first time they do it...