If you're out of status and outside the 90 day time limit to apply for restoration, you would have to leave Canada and apply for your work permit at the border. Inadmissibility due to simple overstay is resolved by leaving Canada. You could flagpole at the nearest US border and pick up your new work permit on the way back in.