Sorry for a late response. I'm glad you managed to resolve the problem, could you share your solution so that other people with similar issue can repeat your steps?
Hi, Paul.
Sounds like you're talking about REST API. And that your are overwriting data with older values if B managed to read record before A finished to update it. Classic conflict resolution ...