UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'CALJ8oIpHgtyLrOLo3zbYj2nHixgxLNcJVRogxC1JiQ='
WHERE
key_id = 'abc32208da63e0913351aefc452209de22c1fa7ae4a5a745acfea1f4b2c7845f'
AND (
token = 'CALJ8oIpHgtyLrOLo3zbYj2nHixgxLNcJVRogxC1JiQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)