Get us the model number info off the engine. There are way too many possible engine combinations to give suggestions. Heck at this point the murray that you list has been made by three different companies.
the model # on muffler is 31N707
When the engine dies, try turning the key off and on a few times and listen for the click of the fuel solenoid on the carb. No click replace. if it does click then try restarting the mower. If it restarts there is a chance the plastic tip on the solenoid is coming off and shutting off the fuel, then when you turn the key off, it reseats the tip.
Two things come to mind. Does it have a fuel pump, and if so may be quitting after it gets heat sinked. The other thing is the used ignition module is failing after it gets hot.