That's great that you've decided to quit smoking, the first week or two is the hardest, but you'll soon find yourself wondering why you ever smoked in the first place. The increase in mucus, and discomfort is your lungs finally being able to start to repair themselves, which is a good thing. Depending on how long and much you smoked you could have an increase in phlegm for a few months, but it just means your lungs are repairing themselves. Smoking has an immune suppressing affect especially on the lungs, so there will be some increased inflammation in the lungs after quitting because the immune system is finally doing the repair work it needs to. Also all the tar, and junk has to come out, and the only way for the lungs to do that is to increase mucus production.
It's somewhat counterintuitive, but immune activation is what makes people feel worse, but it means the immune system is working, and doing it's job, and healing the body. It's sort of like when you have the cold, or flu, it's actually your immune system battling bugs that makes a person feel crappy not the bugs themselves, and it just means the immune system is doing it's job, if someone had an infection, and the immune system did nothing the person would feel better, but the body would be slowly taken over by pathogens.
So keep at it, the discomfort your feeling now will pass, and you'll thank yourself when your fifty, and have a clear chest x-ray :-) Take care