Fixes #3038 : Set expiration time when creating record

Fixes #3038
there's already a reference to `statistics`... no need to lookup it again ..
`statistics.setExpirationTime(expirationTime);`