They will need a booster at the recommended time before lambing either way.
If they haven't had any vaccines to date, it would definitely be worth doing them now (if you Google the Noah compendium and type in heptavac, you can check the contraindications don't include mating, but it must allow in pregnancy as they get the prelambing booster!) The only thing that may be an issue is stress and knocks from penning or running through a race to vaccinate, but the alternative of potential sudden deaths from clostridia is a risk.