The general answer is that, yes, Query/400 queries can be helped by improvements in 6.1 as well as in V5R4.
<i>Will the SQL performance improvements in V6R1 affect QUERY?</i>
They aren’t exactly “SQL” improvements, although there are some of those.
<i>Does QUERY use SQL under the hood?</i>
As far as I know, no, it does not “use SQL”. It’s better to say that the SQE (SQL Query Engine) is used by database queries much more often, mostly replacing the CQE (Classic Query Engine).
“SQL” refers to the language — Structured Query Language. Query/400 (or Query for iSeries) doesn’t use SQL, but the queries should mostly be processed by SQE rather than CQE. Particularly in V5R4, the QAQQINI file has options that may help in directing the vast majority of queries through SQE even for Query/400. Note that even SQL queries can sometimes be routed through CQE.