Technically this doesn't lock the account, it turns off the teacher's portal stopping people from logging in. Jason Springel has developed a customization available on PowerSource.
https://support.powerschool.com/exchange/view.action?download.id=624
How to disable/enable Teacher Gradebook logins while scheduling using Staff Field Value
This is so while scheduling, teachers can’t see their classes until you’re ready.
The PTAccess uses a value of 1 for enabled, and a value of 0 means disabled.
Follow the instructions below to disable your Teachers Gradebooks
You have now completed the disabling of the Teacher Gradebook
Repeat the process to enable Teacher Gradebook access but change the New Field Value to 1 to open.
NOTE: IT’S BEST TO COMPLETE THIS PROCESS ONCE ALL NEW TEACHERS ARE ENTERED. IF YOU DO THIS BEFORE, THEN ALL NEW TEACHERS WILL SEE THEIR CLASSES IF THEIR GRADE BOOKS ARE ACTIVE.
This is just disabling them from logging in. I don't want to use the word "Lock". I was scheduling one summer before knowing this and they were emailing me about their class lists. I enable access after the principals okay everything.