added update_by_query to allow user-created queries

This allows for queries using operators other than "=", e.g. "opened_at > some_datetime".