Add support for expiry and updates in db