Is there a bad odor in the beak? Does the material come of when you try to remove it? Canker or trichmoniasis could be a possibility. That can be treated with an antiprotozoa medication called Aqua Zole (metronidazole) given orally or acidified copper sulfate given in water. Thrush or fungal infection also could be possible. If a vet is possible, that would be best.
I went to check up on him and it seems like the outer "shell" of whatever he has had came off, he can shut his beak now but it's still there. No bad odor seems to be coming out his beak either. I think whatever's in his mouth has turned more yellow then it was too.