java.time
You are using terribly-flawed legacy date-time classes. These were supplanted by the modern java.time classes defined in JSR 310, built into Java 8+.
The java.sql.Date class was replaced by java.time.LocalDate.
Determining the current date requires a time zone. For any given moment, the date varies around the globe by time zone.
ZoneId z = ZoneId.of( "America/Edmonton" ) ;
LocalDate today = LocalDate.now( z ) ;
You said:
expiration date calculated automatically which allows only 1 month
LocalDate expiry = today.plusMonths( 1 ) ;
You said:
saving the date into a date column in mysql
Make sure you define your column as a data type akin to the SQL Standard type DATE. In MySQL that would be DATE.
JDBC 4.2 and later requires every JDBC driver to support the java.time types.
Writing:
myPreparedStatement.setObject( … , today ) ;
myPreparedStatement.setObject( … , expiry ) ;
Retrieving:
LocalDate start = myResultSet.getObject( … , LocalDate.class ) ;
LocalDate expiry = myResultSet.getObject( … , LocalDate.class ) ;