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...