How secure is a 40 bytes hexadecimal string AES256 encrypted with 50 bytes random password
For reference, this is the Ansible Vault format. In short:


It derives an AES key, HMAC key and IV from the password using a 32-byte random salt
It encrypts the data using AES-CTR with the derived key and IV
It MACs the ciphertext (but not the IV) with HMAC-SHA256. Not including the IV is usually bad, but since the IV is derived from the password and salt and it's not stored with encrypted data, it seems OK.


As far as I know, this looks safe if the password is strong enough. In your case, what you call "key" seems to be the password, and is certainly long enough.