Fix RESTORE ttl handling in 32 bit archs.

long was used instead of long long in order to handle a 64 bit
resolution millisecond timestamp.

This fixes issue #1483.