I would like to create a rule that triggers when I command a lock 'locked' or 'unlocked', regardless of whether or not the command is successful. Is there a way to do that?
No, at least not with a stock driver and a single device; an app can only respond to events from a device, not commands per se, though this type of command is generally sent with the intent to create a change that would generate one.
If you explain more about your use case, someone may be able to come up with another idea that may work. For example, you could add a virtual lock to the mix and always send a command to it at the same time as your "real" lock, which should always generate an event since that is built-in to the driver, and that could be used to trigger a rule--or you could find some other, event-based means of doing so. But without knowing more, it's hard to say much.
This. Or use a virtual switch as a trigger. And for the actions lock/unlock your real lock, as well as the other actions you wish to run independent of whether the lock() or unlock() command was successful.