Mountain Bike Riders, Question

I wanna get me a new bike for exercise. I'm 6', 265lb, and need to lose about 40lb. My last mountain bike lasted almost 25 years (Huffy). I sold it at my last garage sale and it still rode good.
I like mountain bikes due to their versatility. What bike should I consider? I will do mostly street riding, maybe an occasional trail but nothing crazy like the hard core riders. I can't afford a top of the line bike, maybe $300 max? I've been told to stay away from the big box stores like Walmart.