I am not sure your requirements really make sense.
Anyway every time you read an ID you need to compare that ID against all the other IDs you have already read.
If the ID is a new one you store the ID and turn the LED on.
If the ID is an existing one you just turn the ID off (and maybe you also want to delete it from the list of IDs you have read?).
One problem you may have is storing the IDs as memory is limited and you may need to use an SD card.