This seems to be a Bug, it should stop it as it happened the second time you tried. Please report it so we can try to replicate it and find the problem.
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 ...