Implement a thread-safe, memory-efficient LRU cache that supports time-based key expiration.
Implement lru_cache_operations(capacity, operations). Each operation is either ['put', key, value, ttl, now] or ['get', key, now]. A key expires when now >= insertion_time + ttl; expired keys behave as misses. Return values from get operations in order. Assume operation timestamps are nondecreasing, keys are strings, and capacity >= 1.
def lru_cache_operations(capacity, operations):