If the air compressor's safety valve trips at operating pressure or well below the relief set point, replace the safety valve because it's broken.
If the tank is over pressurized, the pressure switch isn't shutting off the motor when the air tank fills to the cut-out pressure. Move the pressure switch lever to the off position. If the compressor continues to run, replace the pressure switch, because the switch isn't shutting off the compressor motor.
If the compressor shuts off when you move the pressure switch lever to the off position, pull the safety valve ring and release all air from the tank. Switch the pressure switch lever to the on position and allow the tank to fill. If the compressor doesn't shut off when the air tank fills to the cut-out pressure, replace the pressure switch, because the switch isn't shutting off the compressor motor when tank pressure reaches the cut-out pressure.