Most data 'layers' have some kind of check to see if the record is still the same by the time you commit changes to the database.
For example, you retrieve a record from the database containing 'a', and you change it to 'b'. When you commit that to the database, the command you execute will check for 'a' and update that to 'b'. Now if somebody in the meantime changes the 'a' in the database to a different value (say 'c', the command check for 'a' and change it to 'b' will result in nothing, because 'a' doesn't exist anymore (because it's already changed to 'c').
Your code 'knows' there's a change an expects your database to update 1 record, but the database returns a result of 0 changed records. That is exactly what your error means.
You need to find a way to handle that kind of changes depending on some choises. You can choose for example to retrieve the record from the database, update the user's changes and immidiately write it back to the database, but there's a chance you'll undo the changes made in the first transaction.
You may want to take a peek at
this[
^] page. It explains way better what's going on than I can.
Good luck!
Eduard