set key with expiry