as of MySQL 5.6, queue_wait() can no longer be used as part of the WHERE clause