This code will be re-used a lot in methods introduced later in the stack - creating a separate function.
In all cases, this method will be called from a task invoked on the crypto thread, since tasks are sequential and invoked in order on one thread it should result in the same order on the database thread so there is no chance to override/miss some updates on crypto account.
Depends on D10370