Handle keys without expiry date right

Fixes #765