Your snake won't suffocate because there is dirt in the holes that are on the outside of the head. Snakes breathe through a hole that is under their tongue inside their mouth. Some air goes in and out through two small holes on the outside of their head (I believe that is how it works, correct me if I'm wrong) but is mostly to smell any scents in the air.
A vet visit ASAP is a good idea. A vet and a helper or two can help your snake get the dirt out of its heat pits (that is what most of the holes just above the top lip of the snake are) easier and with less stress to your snake. Ask the vet if de-worming is a good idea since you don't know how well cared for the snake was before you got it.
Please, experienced snake owners, let me and the OP know if this is wrong.
My BP has filled his heat pits and nostrils with coconut fiber substrate when he missed on a strike. His mouth was full too. I used the eraser of one pencil and the eraser end of another pencil to hold his mouth open and got some of it out of his mouth. He got the rest of it out on his own.