First, do they say "query for longer"? If not, don't bother.
If they do, however, this is usually what I say:
*****
Mr. Editor,
Greetings. I am writing to query you about my story "This Is Very Long", which is 11,000 words -- 2,000 over your stated limit. As your submission guidelines suggest that we query first, that is what I am doing.
"This Is Very Long" is a story about x, who does y, in the face of z. (This part is usually a 2-3 sentence paragraph teasing the story.)
Please let me know if you would be interested in reading "This Is Very Long", and I will send it via the usual submission method.
Thanks.
Listener
*****
Two notes:
1. The editor may say "send it directly to me", in which case, bypass the normal submission method and send it directly. But if s/he doesn't offer that option, don't do it. However, when you submit normally, make sure to reference your successful query (I also attach a copy to the e-mail) and the editor who approved your longer submission by name.
2. Never attach the story when you send the query. Always wait for a response.