I'm running into an issue where a script is updating a record based upon an external event at the same time the record is being edited by a user.
This is causing the script to fail with a record modified error and causes the update to be lost.
How can I prevent issues like this from occurring?