Mucus plug

I’m 37 weeks today and last night I went to the hospital due to really bad contractions all day. I was dilated to a 4 (last week at was at a 2) but they said the contractions weren’t dilating me fast enough, and to go home and labor at home. When I got up this morning I noticed that I had lost my mucus plug. Bloody show and all. So with that being said.. how long did it take before you ended up back in the hospital?