SET block_encryption_mode = 'aes-256-cbc';
SELECT * FROM `messages` WHERE AES_DECRYPT(FROM_BASE64(`messages`.`message_text`), UNHEX(SHA2('marks', 256)), REPEAT('\0', 16)) = 'Марк';
Неизвестная системная переменная 'block_encryption_mode'
Incorrect parameter count in the call to native function 'AES_DECRYPT'
Encoding with a 128-bit key length is used, but you can extend it up to 256 bits by modifying the source.