Portuguese law gives you 2 years of legal warranty from the date of purchase, regardless of what the invoice says. Those 30 days you see around is just store marketing, not law. So yes, at 40 days you're still completely within the timeframe to make a claim.
What works well is sending an email to the store (or to Electrolux directly) with a photo or video of the noise - like record it on your phone while the fan is running. That gets logged with a timestamp, much stronger than talking to a shop assistant. Mention that you bought it 40 days ago and the defect appeared naturally during normal use. Ask for repair or replacement, your choice. Most stores respond within 48 hours when they see documentation.
If the store gives you trouble, contact the Consumer Dispute Arbitration Centre or the IAAC - it's all online and free. But honestly, with an invoice and written record, it rarely gets there. They'd rather sort it out quickly than deal with formal complaints.