Hi,
If the lot is created automatically through delivery / material document, the lot will be automatically cancelled once the origin doc is cancelled and the lot status will be LTCA. Please go through the help doc: Cancellation of an Inspection Lot - Inspection Lot Creation - SAP Library
The inspection lot will be still displayed in QA32 / QA33. If you want to remove it from QA32 list, you may refer the thread: How to remove canceled inspection lot from QA33? | SCN
If you still think there is inconsistency, refer the note: 48815 - Checking possible inconsistencies between MM and QM
Regards,
AKPT