Implement a lookup mechanism using a map or hash table to retrieve data with optimal time complexity. Given a list of unique [key, value] records and a list of query keys, return the corresponding values in query order. Return None for a key that does not exist. The function must preserve duplicate queries and should run in O(n + m) average time, where n is the number of records and m is the number of queries.
def lookup_values(records, queries):