how to set custom key to mifare RFID 13.56mhz card, using RC522 module?

I need an example code to write my custom key to this cards, can it be possible with this module? and with those cheap one dolar cards that store 1kb? I dunno if it are mifare classic or other, but seems to be mifare at least