Abdominal Spasm

Today during a meeting I think I contracted my abdominal muscle. Immediately upon doing so, the top right part of the muscle spasmed, I think. The rest of my abdominal wall was normal, but the top right was sticking out and hard as a rock. For abs I do front levers and ab rollouts. Only did the front levers this morning.
It felt like my insides were going to burst haha.

Has anyone else had anything similar, and what the hell do I do to prevent that in the future?

Thank you