UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'utXUBohi1zRHIYciHoZtHWd/RmXlFw3zLSQgsXuPLgs='
WHERE
key_id = '95352eae4a37daf6ed59e4bce6e2b546b64b62a8966674da7c473419a4a04d00'
AND (
token = 'utXUBohi1zRHIYciHoZtHWd/RmXlFw3zLSQgsXuPLgs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)