Alright, I had to go the database and reset the lock state of all the posts Unfortunately, this means I had to reset genuinely locked posts as well. But I think we can live with that.
For future reference, I had to run this in the MongoDB shell:
x = db.getCollection('objects')
x.updateMany({ _key: { $regex: /^topic:\d+/ } }, { $set: { locked: 0 } })
On a side note, NodeBB code is so well done