Today i recived an exception mail saying this :
Exception Message: Upsert failed. First exception on row 0; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record: 
I searched the meaning of this error and found this:
This is something temporary and would be fixed automatically in 10-15 minutes maximum. Some common causes are - 1. Sharing Rules are being calculated. 2. A picklist value has been replaced and replacement is in progress. 3. A custom index creation/removal is in progress. 4. Most unlikely one - someone else is already editing the same record that you are trying to access at the same time.
The thing is our platform doesn't have an autoretry and my org told me to try doing that on the web service callout.
My initial idea about how to deal with this would be this : -We do the WS callout, when we get an exception, we analize the code of it, if it's de UNABLE_TO_LOCK_ROW error then we should schedule another callout after 15 minutes. We could also add some kind of logic to avoid infinite loops(wich however shoudn't be happening if the exception definition i found is correct)
The problem is i have no idea if its even posible to retry that callout with a deadtime of 10-15 minutes. Is it?
I'm not demanding obviously the solution code , just a general guideline to know if this is possible, and in afirmative case, how can i make the best approach to the optimal solution.