Uggh, I was cornered into writing a couple of these over the years. The way I handled it was:
1. make sure both operations will be retried if they don't run to completion, and
2. think through how the rest of the system would react to one of them being present without the other
Then I use whichever of the two orderings is less bad from the perspective of #2. Obviously this depends on the exact use case -- I was simply lucky that the rest of the system was designed in such a way that it could tolerate that bad intermediate state.