getLog() is just a findModel() method, except it will create the log object if it doesn’t see it in the database. In other words, it’s a findOrCreate() method for QueueLog ActiveRecords.
I’m just not understanding how ANYTHING can be outdated if I’m inside the transaction block?
This error message is created by the optimistic locking feature you can enable in ActiveRecord. As far as I see the problem is not related to your transaction but lies in the way you have configured the Optimisitc Locking feature.
Unrelated to the issue: your transaction code is missing a rollback part: