40 MPH?? I highly doubt that. Maybe 40KPH. Also weight is a factor, as in your weight. My XC100 is supposed to go 28MPH but I weigh 210 lb. and can barely get 24MPH out of it.
As to the "impossible": No, it's not impossible to upgrade the motor, but you'd have to get a new controller at the...