I am using Infura node, thus I had to sign the transaction with w3.eth.account.sign_transaction and then send it with w3.eth.send_raw_transaction.
The gas that I used was too low apparently, and the transaction is pending for 8 hours now.
By looking in the docs I noticed there are two methods that could help me w3.eth.modify_transaction and w3.eth.replace_transaction.
The idea would be to use one of them (not sure what's the difference between them though) to modify the transaction gas so it gets confirmed.
The problem is, I don't see in the docs how to use one of those two methods and sign the modified transaction with my private key because both of them make the RPC call to eth_sendTransaction which isn't supported by the shared Infura node.