How to delete Object if value of nested object property value < epoch

I have an object tree that contains the following values.

data = {
  TD2n9thHQgyvWdPhOkHQ: {
    heartbeat: 1644637961658,
    joinTime: 1644636756368,
  },
  IASJDAIODJiklk243oi: {
    heartbeat: 1644637961658,
    joinTime: 1644637961658,
  }
 }

I am trying to check if the value of each heartbeat is 10 seconds less than the current time from epoch and if it is, delete the parent object.

Any help would be much appreciated!