1. A computer-implemented method for minimizing a lock period to modify shared data in a shared database, the method comprising: executing one or more initial instances of a process, each instance reading the shared data without acquiring a lock on the shared database; obtaining results that are directed to modifying the shared data and buffering the results at least partially; determining whether a next instance is to be final; and in response to a determination that the next instance is to be final, executing a final instance of the process that uses at least one of the buffered results during execution and acquires the lock on the shared database to modify the shared data.