It is not advisable to force entry to the vehicle yourself straight away. Depending on the level of distress, your first step should be to call the police on 101, or 999 in an emergency.
If the police don't have time to get there, then you have to decide if you should take action by forcing entry. Make sure you tell the police what you intend to do, why and, where possible, take images/footage of the dog and the names and numbers of witnesses to the incident. The law states that you have a lawful excuse to commit damage if:
'at the time you believed that the person whom you believe to be entitled to consent to the destruction of or damage to the property in question . . . .would consent to it if s/he . . . had known of the destruction or damage and its circumstances' (section 5(2)(a) Criminal Damage Act 1971).
(this legal reference is slightly modified for clarity)
Do not do this without fully assessing the situation, and being prepared to defend your actions in court, in the event of any legal action being taken against you.
The RSPCA can offer guidance on information on cruelty via their cruelty line at any time on 0300 1234 999. See further advice from the RSPCA on the website in related information.