After some more testing I think the rule is not the problem.
I think it is triggering twice due to another issue in Hubitat. Programmatically locking my locks seems to trigger two events. It's even occurring if I do it via the device web page. And the same with unlocking programmatically. Manually locking/unlocking the lock by hand does not trigger two events.
I've tested this with my other locks as well, and the same thing happens, even when there are no rules for the lock.
This didn't used to happen, so maybe it's something in the recent update.
I'll start a new thread: Getting multiple lock events when programmatically locking/unlocking locks