Added optimistic locking retry