I'm not sure what vintage your copy of the code is, but revision 209
https://libprs500.kovidgoyal.net/changeset/209 (when I implemented device unlocking) had the following structure for UnlockDevice commands. May have been 4 before that.
class UnlockDevice(Command):
""" Unlock the device """
NUMBER = 0x106 #: Command number
key = stringfield(8, start=16) #: The key defaults to -1
def __init__(self, key='-1\0\0\0\0\0\0'):
Command.__init__(self, 24)
self.number = UnlockDevice.NUMBER
self.type = 0x01
self.length = 8
self.key = key