Classical and quantum dynamics of a charged scalar particle in a background of two counterpropagating plane waves