QUESTION

 Does set_key_expiration immediately clear the cache once the key is expired?

ANSWER

No it does not, as DynamoDB's Time to Live is within 48 hours after the key expiration in which items past their expiration can still be updated.