It's close terms, but difference is that search query is the phrase the user types in the search engine to get some info, while keywords is a set of words that describes the content of website to search engines and they are used in multiple search queries.
Here is good keywords example on cat's subject:
- toys for cat
- house for cat
while search queries might be pretty different and include all the variations of keywords, typos, tied with locations etc:
- how to make toys for cat yourself
- buy toys for cats in London
- what toys are best for cat
- house for cat design.