If it runs great for about 20 minutes and then stops, does it sound like it's starving for gas or surging? Do you hear any misfires/backfires?
My first guess will be something having to do with the magneto getting spark to the plug. Pop the cover off the top of the engine and check for any wiring that is rusted, broken or in bad shape. I'd start with that.
You may also have a line that is partially clogged up going to the carburetor. As the engine runs, the level of gasoline in the carburetor bowl could be dropping and causing the engine to stall out. When it stops it could fill up just enough to restart and run for a few seconds. You could try using any fuel system cleaners. I personally use SeaFoam in all of my outdoor power equipment. It helps to stabilize the fuel, especially now that everything has ethanol in it.
In case you didn't know, ethanol is hydroscopic meaning that it absorbs water. Don't buy more gas than you can use within 30 days. After that, put it in your car to get rid of it and buy fresh for your mower.
Let me know what you find.