Fixes write to use set and expire_ttl vs setex directly