Only save USER_QUERY for recent queries

Signed-off-by: Ian Lake <ian.hannibal.lake@gmail.com>