Handle keys without expiry date right

Fixes #765
Merge pull request #766 from mar-v-in/patch-1

Handle keys without expiry date right