Well, i guess the problem is more simple:
If you execute /lock or /unlock you execute the “simple lock actions”. Simple /unlock for a door with knob at the outside translates into the unlatch command.
You have to call /LockAction with the proper lock action behind.
Check the spec for details: MQTT API Specification v1.4