That will work absolutely fine - although, if you plug it into your PC to do file transfer speeds you will only get USB/USB 2 speeds.
USB is generally fully backward compatible and will always work at the speed of the slowest device. a USB1 port, USB2 cable, USB3 phone will work at USB1 speed (slowest) but will work. Likewise, if your computers port is USB2 capable - you will get a USB2-USB2-USB3 "chain" which will slow to USB2 speeds... and so on.
It is also worth noting that charging through a USB3 cable and charger will be faster. USB2 can only draw up to 500mA of power, where a USB3 setup can pull up to 900mA - however, this slower charge will not hurt your battery at all! Further to this, going the other way and offering a USB2 phone a usb3 charger will be safe as only 500mA of the possible 900mA would be "asked for" by the phone.
For a full USB2 & 3 comparison, take a look at: This page
Hope this helps.