def METHOD_NAME(model_class: Type[BaseScheduledDeletion], process_task: Task) -> None:
    queryset = model_class.objects.filter(in_progress=False, date_scheduled__lte=timezone.now())
    for item in queryset:
        with transaction.atomic(router.db_for_write(model_class)):
            affected = model_class.objects.filter(
                id=item.id,
                in_progress=False,
            ).update(in_progress=True)
            if not affected:
                continue
        process_task.delay(deletion_id=item.id)