A motion to withdraw a plea of guilty or nolo contendere may be made only before sentence is imposed or imposition of sentence is suspended; but to correct manifest injustice a court after sentence may set aside a judgment of conviction and permit the defendant to withdraw his plea.
SDCL 23A-27-11