Add lock/unlock statement to container