Help what is this????

I’m 27 weeks+3 days pregnant I have been getting a lot of pain in my lower abdomen and in my lower back, the pain started about 3am and it has eased at the moment it’s not as painful. I’m feeling baby kick a little bit but not as much as usual! Then I’m laying in bed trying to rest cause my back pain and I feel something come out of me and so I put my finger there and there’s a load of this white stuff and I’m freaking out! Is it discharge is it mucus plug I haven’t had this before ??? Sorry for the disgusting pic