awk script need to act on same file on matced case

Hello,
I have a log file , i want to delete the lines of the log file which is match with 1st and 5th field with different patterns. Once it will meet with that condition it will delete that line from the log . I dont want to create any temp file over there.

Successfully able to retrieve the lines as

awk '$1~/222/ && $5~/abc/' test.txt

These output line need to be deleted from my log.

Thanks

try this:

sed -i '/222.*abc/d' infile