Your data is not normalized. You need 2 tables. One for the cart, and one for the items. The cart table will hold everything unique to the cart, eg: the user making the purchases. The second table holds the purchases. It has a row for each item, and the id of the current entry in the carts table.
eg:
cart_id | item_id
1 | 1
1 | 2
1 | 3