We are very close to finishing the following operation (it's in test stages right now):
# acquires a server associated with the build-servers role
ServerName => $AcquiredServerName
for server $AcquiredServerName
Log-Information Acquired server: $ServerName;
This would eliminate the need for the lock altogether.
While designed for the next minor release, we can release this as a sort of "beta" operation in the next maintenance release (v5.6.9)... which should be end of this week early next.