In a lot of situations where a contract like that comes to court, the company will try to convince the judge to simply reduce the scope of the contract to whatever seems reasonable to them - and this can succeed. (Of course if you're in a state where non-competes are blanket illegal, that's different.)