I had the same problem before. The QT 50 gas tank is famous for the rust & gunk inside.
Basically, what you would need to do is, take the petcock (gas valve) off the gas tank (I am assuming this is already done)
On the petcock switch, in the center is a screw holding the switch there. Unscrew that. Take the switch off.
You will see a tiny hole in the switch and a tiny hole in the hole where the switch came off of. That is where the gas flows.
Take something thin like a good wire or MAYBE a coat hanger and poke through the holes to clear it out. (may be just right, or too thick) Don't force anything.
The petcock is alumninum I think. I know it won't rust for sure. With this in mind, it is best that maybe you can soak the whole thing in brake cleaner or carb cleaner. Either works fine. Soak it for like 10 minutes.
Then rinse it off well... And here's the important part- use an air compressor and force air through the danged thing. If you don't have an air compressor you can use your mouth, put the clean & assembled petcock to your mouth (you can keep the screw holding the switch on the petcock off at this point)
As you blow, alternate between on and off. When on, you should have air flow. If there is no air flow, then you need to redo everything and make sure you have cleaned everything completely.
It's been awhile, since I took mine apart, but I believe there is a screen between the bolt on top that hooks to the tank and the petcock. You have to remove the bolt to access it. It'd be a good idea to do this. Clean the screen.
After that, don't put the petcock on yet. This is only 50% of the problem. The other 50% is the gas tank. You can buy a gas tank cleaner kit. There is a name for it, but it doesn't come to mind at this time. (There's a mention of it on this site) It eats rust and gunk and leaves your tank shiny clean.
If you can't find this thing, buy engine brite (engine cleaner) from pepboys or autozone. Spray this stuff inside the tank and leave it there for a good hour, rinse. Then repeat this 3 or 4 times, having it soak for an hour each time and rinse out each time.
If you have a wire brush, MAKE SURE THE DANGED bristles ARE GOING TO STAY ON THE BRUSH. Otherwise, you may be stuck with brush bristles in the tank. Brush the inside of the tank the best you can. Then rinse out.
After you have rinsed the gas tank out by water, then put in about 1/2 tank worth of gas and shake the thing (at this point, the tank has to be removed from the moped) And let the gas out. Then put in a 1/2 cup of Yamalube in the tank and shake it around. Make sure it coats all the walls in there. It will help protect your tank from rust and kind of coat it.
KEEP YOUR TANK FULL as much you can. It stops rust.
Then put the whole thing back on and the petcock as well and youre all set.
If you don't really want to do the gas tank thing, you can skip it. But the petcock will keep getting stuck (if you have rust or gunk in the tank) In this case, just keep taking it off, clean it, put it back on.
Another thing I would recommend to make the QT 50 run nice and keep the carb clean- splice in a lawnmower filter. They are about 2 or 3 bucks at a local hardware store/small engine repair store.
Best of luck to you.