Faster update using locks