bo: Add standard public lock function