Politically Mexico would probably try and stay out of an American Civil War as much as possible. Even if they did manage to hold land in the Southwest for a while the risk of the victorious U.S. faction coming back and crushing them would be much too great to reasonably justify expansion.