Recently an issue was resolved that looks like you could ran into - when same process instance is manipulated by two sessions optimistic lock exception (StaleObject...) can be seen as persistence context was not cleared on transaction end meaning cached object was used on next command execution. It was fixed in 5.4 so soon should be available as Final, meanwhile you could give a try with CR1.
HTH