Your challenge, with a post 1840 point of divergence, is to create a scenario that allows Mexico to "win" the Mexican-American war.
*Note- This Mexican "victory" does not require the retention of all of Mexico's pre-war territories or the reconquest of Texas, but must result in significant amounts of land that became American in OTL remaining Mexican. (I would suggest lower New Mexico and Southern California as possible options.)