I have a metal box and i have to remove a screw rivet from one of the foldings. It is an M3 screw rivet.
To be clear, are we talking about a threaded insert? Generally used on aluminum sheet metal that is too thin to be directly tapped for threads to mount things. Drill a hole in the sheet metal, use a puller to pull the gripping splines of the steel insert into the hole to the point where the larger round flange bottoms out and prevents it from going all the way through. The inside has the threads of interest.
To remove, grab anything with a deep enough hole that loosely fits the flange side to buck up the sheet metal, if you have an assortment of sockets meant for nuts and bolts, one will likely fit close enough.
On something solid, preferably a blacksmiths anvil, build in this order: the socket, flange side of insert, screw in a sacrificial screw of the appropriate thread size, and give it a good wack with a BFH* to drive it back out the way it was pulled in.
BFH = Big Fuggin' Hammer
Gene