Closed cervix with CM?

This may be a silly question…

But how is it possible to have cervical mucus if the cervix is closed? I am 31 weeks and had a bit of an increase in CM and started wondering if maybe my cervix is starting to prepare for labor?