Lock is dynamic. It's aquired when the lock call is made, and held until the end of the scope. Like local, locks don't go missing when you make a sub or method call.
Perl's locks are recursive, unless things have really changed, so it's safe for one thread to get the same lock several times, in which case the lock will be held until the last lock goes out of scope.