Any pain killers including the one you mentioned are not advisable.
The reason for your muscle spasm must be found out first and treated.
One tab of pain killer can cause irreversible
kidney damage if one is unfortunate.
Next Steps
Don't self medicate ,especially with the tab you mentioned.
Health Tips
Consult a Orthopaedic surgeon and take advice.