I am just wondering about the security of that query. By decrypting your data in the query, your query has the key in it. What types of logs will have that key? Usually, logs for selects are turned off, but it would be very easy to get the key by turning them on.
You might want to do the encryption and decryption on the PHP side. You can lock those scripts down away from a dba.
From a performance perspective I wonder if the crypto is faster or on the PHP side or the MySQL side. Not sure. Of course, this may not be important, and in that case, ignore my rant.