goldfish with a stuck mouth

Personally I would try to use some tool to actually open up the mouth. Something like a screwdriver. Obviously you must be extra careful and the tool should be thin and smooth without sharp edges. Also use minimum amount of force. The fish's "lips" are not permanently attached to the jaw. They can be moved a bit independently from it.So if the jaws are locked you might still be able to open up lips just enough to look inside the mouth and see if there is any obstruction and if there is, see how it is wedged and what's the best way to open up the mouth to extract it.

I'm just talking theory here since I have never dealt with this myself. But while we lived in Europe I went fishing frequently as a kid and most popular fish in lakes and rivers were carp and crucian which are essentially wild ancestors of goldfish. So we have had experience with their mouth structure while trying to remove the fishing hook :)
 
Like was said, you'll need to pry the mouth open.
If you are correct that the fish isn't eating, and hasn't been eating, then he's going to die if something isn't done. So, you either let him be and he dies, or you try to fix him and he lives or dies. Time to try to fix him.
 
AquariaCentral.com