Used when you want to lock state in cache, for a claim.
```python
key_name = '...'
lock_value = generate_random_value() # UUID or something guaranteed to be unique
expiration = ... # Some expiration time, maybe 5 minutes, or whatever makes sense for the operation.
cached_lock_value = cache.get_or_create(key_name, lock_value)
if cached_lock_value == lock_value:
# We acquired the lock.
# Do whatever ...
# Clear the lock (if it's still owned by us.
# Note that it might have fallen out of cache, or we took too long.
cached_lock_value = cache.get(key_name)
if cached_lock_value == lock_value:
cache.delete(key_name)
```