Mucus Plug? 36 weeks

With my son it looked similar to this. It wasn't ever bloody. I've been letting a little bit out for the past few weeks. Me and hubby had sex yesterday and this came out 30 hours later. I've been having contractions since 28 weeks due to preterm labor, but haven't been put on pelvic rest. I have been holding out on sex until I hit 36 weeks which I am now. My doctor said she wanted me to get to at least 34. Anything after that she'd be happy with. My first came early and I have been having contractions all evening. What do you think? It was about the size of a quarter.