Contractions?? Help!!

So an hour ago, my stomach got really tight and at the same time my butt hurt like it used to while i was on my period, and also my lower back hurt. I guess about 10 minutes later it happened again and my vag hurt too, than about 10 min later again it happened. Also felt like I had gas. I am 33w and got a little scared. At first i thought braxton hicks but i couldn’t be sure. When I stand up, it feels heavy on my lower belly. And just now, i had this mucus-y discharge, had them last week twice, yellowish-white. Also my legs feel loose. It just feels different than usual..

It’s been half an hour since it last happened, so i don’t know if it will happen again. But i wondee what it was.

What do you think? What should i do if it happens again?