I have tried to reset with no success. I have to restart the box.
An interesting note is that I tried to change the ttl to 10 hours, 24 hours, 1, 2 15 yers on the SAS token and I always get Unauthorized. In Azure logging, the device does connect and I see where Azure IoT Hub returns a 401 even though i created a SAS token in the future.
When i use ttl = time() + expiry + 946684800 as in the example code, the device connects and stays up for several hours sending data. Then, after several hours as noted, Azure IoT Hub will return UnAuthorized.
I can also add time to ttl = time() + expiry + 946684800. such as ttl = time() + expiry + 946684800 + 3153600 with no issues on startup. If i have any time less than ttl = time() + expiry + 946684800, then i immediately get UnAuthorized