To nitpick, France invaded Mexico in 1861.
In terms of consequences, a significant one will be that many of Juarez's reforms will be stalled. Following the war with France, Juarez won the power to rule by decree, and forced through a variety of reforms, such as in education.
Absent the war with France, the Conservative position will be relatively stronger, leading to potential opposition to Juarez. Hard to say exactly how that will play out, but there could be significant changes.
Mexico would of course gain from not having the loss of life and economic cost of the war.