Altering Keyspace is needed when you need to update REPLICATION or DURABLE_WRITES.
Syntax:
ALTER KEYSPACE WITH
ALTER KEYSPACE "KeySpace_Name"
WITH REPLICATION = {'class': "Strategy_name", 'replication_factor' : "Number of replicas"}
AND DURABLE_WRITES = true;
Example:
ALTER KEYSPACE test_keyspace
WITH replication = {'class': 'NetworkTopologyStrategy', 'replication_factor': 3}
AND DURABLE_WRITES = true;