W końcu to zrobiłem.
def mysql_aes_decrypt(val, key):
def mysql_aes_key(key):
final_key = bytearray(16)
for i, c in enumerate(key):
final_key[i % 16] ^= ord(key[i])
return bytes(final_key)
k = mysql_aes_key(key)
cipher = AES.new(k, AES.MODE_ECB)
return cipher.decrypt(val).decode()