The woman or man found guilty of sexual intercourse - lash each one of them with a hundred lashes, and do not be taken by pity for them in the religion of Allah , if you should believe in Allah and the Last Day. And let a group of the believers witness their punishment.
[Qur’aan 24:2]
This Verse as it is, is general in meaning. This means any Zaani (person who has had illegal sexual intercourse) is to be lashed whether he or she is free, a slave, married, or unmarried.
However, this general Verse has been specified.
Firstly, the female slave is only to receive 50 lashes as outlined in the following Qur’anic Verse.
And whoever among you cannot [find] the means to marry free, believing women, then [he may marry] from those whom your right hands possess of believing slave girls. And Allah is most knowing about your faith. You [believers] are of one another. So marry them with the permission of their people and give them their due compensation according to what is acceptable. [They should be] chaste, neither [of] those who commit unlawful intercourse randomly nor those who take [secret] lovers. But once they are sheltered in marriage, if they should commit adultery, then for them is half the punishment for free women. This [allowance] is for him among you who fears sin, but to be patient is better for you. And Allah is Forgiving and Merciful.
[Qur’aan 4:25]
Second, this general Verse has been specified by a verse the recitation of which was abrogated but its Hukm (legal application) remained in effect. The Verse was
الشيخ والشيخة إذا زنيا فارجموهما البتة نكالا من الله ، والله عزيز حكيم
“The old man and the old woman, if they commit zina, then stone them both, a punishment from Allah, and Allah is Almighty, Most Wise.”
Reference(s):
أضواء البيان في إيضاح القرآن بالقرآن](إسلام ويب - أضواء البيان في إيضاح القرآن بالقرآن - سورة النور - قوله تعالى الزانية والزاني فاجلدوا كل واحد منهما مائة جلدة- الجزء رقم5)