fixing ttl stuck bug edge case

Fixing the bug where sometimes a key fails to set an expiration time properly so it ends up with a negative ttl in redis.  The fix is to check the ttl before setting the key.  if it's negative we know that we need to create a completely new key and not just increment the counter down.

Line is too long. [104/80]<br>Redundant curly braces around a hash parameter.<br>Space missing after comma.