E' sufficiente che usi la delete con il where e la clausola limit, ad esempio:

delete from tabella where codice = 'x' limit 5