Retry when doing optimistic locking.